<table id="grouped-expenses-sum-table" class="table table-bordered">
    {% for catId, data in groupedExpenses %}
        <tr>
            <td>
                {% if not loop.last %}
                    {{ loop.index }}.
                {% endif %}
            </td>
            <td {% if loop.last %}class="last"{% endif %}>{{ data.name }}</td>
            <td {% if loop.last %}class="last"{% endif %}>{{ data.sum|number_format(2, '.', ',') }} </td>
        </tr>
    {% endfor %}
</table>